CSharpTest.Net
TryUpdate(TKey,TValue,TValue) Method
See Also  Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Collections Namespace > IDictionaryEx<TKey,TValue> Interface > TryUpdate Method : TryUpdate(TKey,TValue,TValue) Method

key
The object to use as the key of the element to update.
value
The new value for the key if found.
comparisonValue
The value that is compared to the value of the element with key.

Glossary Item Box

Updates an element with the provided key to the value if it exists.

Syntax

Visual Basic (Declaration) 
Overloads Function TryUpdate( _
   ByVal key As TKey, _
   ByVal value As TValue, _
   ByVal comparisonValue As TValue _
) As Boolean
C# 
bool TryUpdate( 
   TKey key,
   TValue value,
   TValue comparisonValue
)

Parameters

key
The object to use as the key of the element to update.
value
The new value for the key if found.
comparisonValue
The value that is compared to the value of the element with key.

Return Value

Returns true if the key provided was found and updated to the value.

Exceptions

ExceptionDescription
System.NotSupportedExceptionThe IDictionary is read-only.

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys